package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_org_cl")
public class OrgCl extends Model<OrgCl> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "cid", type = IdType.ASSIGN_ID)
    private String cid;
    /**
     * 组织ID
     */
    @TableField("id")
    private String id;
    /**
     * 父级组织ID
     */
    @TableField("parent_id")
    private String parentId;
    /**
     * 组织名称
     */
    @TableField("name")
    private String name;
    /**
     * 父级组织名称
     */
    @TableField("parent_name")
    private String parentName;
    /**
     * 层级
     */
    @TableField("distance")
    private Integer distance;

    public void freeData() {
        this.cid = null;
        this.id = null;
        this.parentId = null;
        this.name = null;
        this.parentName = null;
        this.distance = null;
    }

}
